<?php

namespace app\common\model;

use think\Model;

class NobleRecordModel extends Model
{
    public function user()
    {
        return $this->hasOne(UserModel::class, 'id', 'uid')->field('account');
    }

    public function anchor()
    {
        return $this->hasOne(UserModel::class, 'id', 'anchor_id')->field('account');
    }

    public function noble()
    {
        return $this->hasOne(NobleNewModel::class, 'id', 'noble_id')->field('id,name');
    }
}